package test9;


public class Demo5 {
    public static void main(String[] args) {
        System.out.println(get(3));

    }

    public static int get(int n) {
        //int[] dp = new int[n + 1];
        //dp[1] = 1;
        //dp[2] = 2;
        int t1 = 1, t2 = 2, t = 0;
        for (int i = 3; i <= n; i++) {
            t = t1 + t2;
            t1 = t2;
            t2 = t;
            //dp[i] = dp[i - 1] + dp[i - 2];
        }
        //return dp[n];
        return t;
    }

}
